<?php
$http = new swoole_http_server('0.0.0.0', 80);

$http->on('start', function($server){
    echo 'on start' . PHP_EOL;
});

$http->on('request', function($request, $response){
    $response->header('Content-Type', 'text/plain');
    $response->end(json_encode($request));
});

$http->start();
